import { Entity, CreateDate, UpdateDate, PrimaryUuid, Title, Role, RolePermission, SysUserId, Boolean, CreateUserId, Uuid } from '@sker/core'
/**
 * 用户组
 */
@Entity({
    name: 'sys_ugroup'
})
export class SysUGroup {
    static title: string = `用户组`;
    static resource: string = `sys_ugroup`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_SYS_UGROUP_ID"
    })
    id!: string;

    @Uuid({ comment: '代理ID', nullable: true })
    aid: string;

    @Title({
        type: 'varchar',
        comment: '组名',
        width: 50
    })
    title!: string;

    @Role({
        comment: '角色',
        nullable: true,
        default: ''
    })
    role!: string;

    @RolePermission({ comment: '角色配置', nullable: true })
    permission!: object;

    @Boolean({ default: false })
    is_default: boolean;

    @CreateUserId()
    create_uid!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}